/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fandi.dao;

import com.fandi.model.ItemModel;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author Fandy
 */
public interface ItemDao {
    void insert(ItemModel model) throws SQLException;
    
    void update(ItemModel model) throws SQLException;
    
    boolean delete(String code) throws SQLException;

    List<ItemModel> selectAll() throws SQLException;
    
    ItemModel selectBy(String code) throws SQLException;
    
    List<ItemModel> searchBy(String code) throws SQLException;
    
    int count(boolean isExpired) throws SQLException;
}
